<?php
/**
 * CreateUser: zlh
 * CreateTime: 2022/3/15 10:14
 * Remark:
 */

namespace App\Http\Requests\Contract;

use App\Http\Requests\BaseRequests;
use JetBrains\PhpStorm\ArrayShape;

class AddContractPost extends BaseRequests
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'contract_name' => "required",
            'contract_type_id' => "required",
            'responsible_department_id' => "required",
            'responsible_staff_id' => "required",
            'contract_total_money' => "required",
            'client_id' => "required",
            'contract_start_time' => "required",
            'contract_end_time' => "required",
            'contract_file_info' => "required",
        ];
    }

    public function messages()
    {
        return [
            'contract_name.required' => "合同名称不能为空",
            'contract_type_id.required' => "合同类型不能为空",
            'contract_file_info.required' => "合同文件不能为空",
            'responsible_department_id.required' => "合同经办部门不能为空",
            'responsible_staff_id.required' => "合同经办人不能为空",
            'contract_total_money.required' => "合同配置不能为空",
            'client_id.required' => "合同配置不能为空",
            'contract_start_time.required' => "合同配置不能为空",
            'contract_end_time.required' => "合同配置不能为空",
        ];
    }
}